package com.bjpowernode.springboot.controller;

import com.bjpowernode.springboot.user.School;
import com.bjpowernode.springboot.user.AAA;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class IndexController {

    @Autowired
    private School school;

    @Autowired
    private AAA user;

    @RequestMapping(value = "/say")
    public @ResponseBody String say(){
        return school.getName()+school.getWebsite();
    }

    @RequestMapping(value = "/sayTwo")
    public @ResponseBody String sayTwo(){
        System.out.println(user.getNames());
        System.out.println(user.getPassword());
        return user.getNames()+user.getPassword();
    }
}
